package com.mdinfo.system.web;

import com.mdinfo.base.common.bean.CommonResult;
import com.mdinfo.system.param.EmpParam;
import com.mdinfo.system.service.IEmpService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2017/11/30.
 */
@RestController
//@CrossOrigin
@RequestMapping("/sys/emp")
public class EmpController {

    @Resource
    private IEmpService empService;

    @RequestMapping("/add")
    public CommonResult<?> add(EmpParam.AddParam param){
        return empService.add(param);
    }

    @RequestMapping("/modify")
    public CommonResult<?> modify(EmpParam.ModifyParam param){
        return empService.modify(param);
    }

    @RequestMapping("/delete")
    public CommonResult<?> delete(EmpParam.DeleteParam param){
        return empService.delete(param);
    }

    @RequestMapping("/listQuery")
    public CommonResult<?> listQuery(EmpParam.ListQueryParam param){
        return empService.listQuery(param);
    }
}
